﻿@inherits  Project.Module.View.CMS.CMSSearchNewsView
@{
    ViewBag.Title = "Tìm kiếm bài viết";
    Layout = "~/Views/Backend/Home/_Master.cshtml";
}
<h2>Tìm kiếm bài viết</h2>
<form method="post" action="/admin/admin-bai-viet">
   <div>
       <table border="0">
        	<tr>
            	<td>Tiêu đề</td>
            	<td> <input type="text" value="" name="keywordTitle" /></td>
            </tr>
            <tr height="10px"></tr>
            <tr>
            	<td>Nội dung&nbsp;&nbsp;</td>
            	<td><input type="text" value="" name="keywordContent" /></td>
            </tr>
            <tr height="10px"></tr>
            <tr>
            	<td><input type="submit" value="" class="search-form" /></td>&nbsp;&nbsp;
            </tr>
        </table>
   </div>
</form>
<table height="20px"></table>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
    @if (this.listNews != null && this.listNews.Count > 0)
    { 
        <tr>
        <th class="table-header-repeat line-left "><a>Tiêu đề</a></th>
        <th class="table-header-repeat line-left "><a>Nội dung</a></th>
        <th class="table-header-repeat line-left"><a>Ngày tạo</a></th>
        <th class="table-header-repeat line-left"><a>Trạng thái</a></th>
        <th class="table-header-repeat line-left"><a>Chỉnh sửa</a></th>
        <th class="table-header-repeat line-left"><a>Xóa</a></th>
        </tr>
        foreach (var item in this.listNews)
        { 
            <tr>
            <td>@item.title</td>
            <td>@item.content</td>
            <td>@item.date.ToString("dd/MM/yyyy")</td>
            @if(item.status == 1) {
                <td>Hiển thị</td>
            } else {
                <td>Không hiển thị</td>
            }
            <td><a href="/admin/quan-ly-bai-viet/edit?id=@item.id">Chỉnh sửa</a></td>
            <td><a href="/admin/quan-ly-bai-viet/del?id=@item.id">Xóa</a></td>
            </tr>
        }       
    }
</table>
<table height="20px"></table>
<input type="button" value="" class="add-form" onclick="addProduct()" />

<script type="text/jscript">
    function addProduct() {
        window.location.href = "/admin/them-bai-viet";
    }
</script>

